package vn.easyticket.db.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * The primary key class for the M111_MOVIEDIRECTOR database table.
 */
@Embeddable
public class M111_Movie_DirectorPK
  implements Serializable

{
    private static final long serialVersionUID = 6681742817959975037L;

    @Column( name = "DirectorId", unique = true, nullable = false )
    private int directorId;

    @Column( name = "MovieId", unique = true, nullable = false )
    private int movieId;

    public M111_Movie_DirectorPK()
    {
    }

    public int getDirectorId()
    {
        return this.directorId;
    }

    public void setDirectorId( int directorId )
    {
        this.directorId = directorId;
    }

    public int getMovieId()
    {
        return this.movieId;
    }

    public void setMovieId( int movieId )
    {
        this.movieId = movieId;
    }

    public boolean equals( Object other )
    {
        if ( this == other )
        {
            return true;
        }
        if ( !( other instanceof M111_Movie_DirectorPK ) )
        {
            return false;
        }
        M111_Movie_DirectorPK castOther = (M111_Movie_DirectorPK) other;
        return ( this.directorId == castOther.directorId ) && ( this.movieId == castOther.movieId );
    }

    public int hashCode()
    {
        final int prime = 31;
        int hash = 17;
        hash = hash * prime + this.directorId;
        hash = hash * prime + this.movieId;

        return hash;
    }
}